package file;

import java.io.File;
import java.io.IOException;

public class Text {
    public static void main(String[] args) throws IOException {
        for (int i = 1; i <=10 ; i++) {
            File file = new File("./test"+i+".txt");
            if (file.exists()){
                System.out.println("file"+"test"+i+".txt已经存在");
            }else{
                 file.createNewFile();
                System.out.println("file"+"test"+i+".txt已经创建");
            }
        }

    }
}
